.class public Lcom/instagram/android/mediacache/i;
.super Landroid/widget/ViewAnimator;
.source "IgProgressImageView.java"


# instance fields
.field private a:Lcom/instagram/android/mediacache/IgImageView;

.field private b:Landroid/widget/ProgressBar;

.field private c:Landroid/widget/TextView;

.field private final d:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/instagram/android/mediacache/m;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter

    .prologue
    .line 33
    invoke-direct {p0, p1}, Landroid/widget/ViewAnimator;-><init>(Landroid/content/Context;)V

    .line 30
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/mediacache/i;->d:Ljava/util/List;

    .line 34
    invoke-virtual {p0}, Lcom/instagram/android/mediacache/i;->a()V

    .line 35
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 38
    invoke-direct {p0, p1, p2}, Landroid/widget/ViewAnimator;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 30
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/mediacache/i;->d:Ljava/util/List;

    .line 39
    invoke-virtual {p0}, Lcom/instagram/android/mediacache/i;->a()V

    .line 40
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/mediacache/i;)Lcom/instagram/android/mediacache/IgImageView;
    .locals 1
    .parameter

    .prologue
    .line 21
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getIgImageView()Lcom/instagram/android/mediacache/IgImageView;

    move-result-object v0

    return-object v0
.end method

.method static synthetic b(Lcom/instagram/android/mediacache/i;)Landroid/widget/ProgressBar;
    .locals 1
    .parameter

    .prologue
    .line 21
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getProgressBar()Landroid/widget/ProgressBar;

    move-result-object v0

    return-object v0
.end method

.method static synthetic c(Lcom/instagram/android/mediacache/i;)Ljava/util/List;
    .locals 1
    .parameter

    .prologue
    .line 21
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->d:Ljava/util/List;

    return-object v0
.end method

.method private getIgImageView()Lcom/instagram/android/mediacache/IgImageView;
    .locals 2

    .prologue
    .line 83
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->a:Lcom/instagram/android/mediacache/IgImageView;

    if-nez v0, :cond_0

    .line 84
    new-instance v0, Lcom/instagram/android/mediacache/IgImageView;

    invoke-virtual {p0}, Lcom/instagram/android/mediacache/i;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/instagram/android/mediacache/IgImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/instagram/android/mediacache/i;->a:Lcom/instagram/android/mediacache/IgImageView;

    .line 85
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->a:Lcom/instagram/android/mediacache/IgImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Lcom/instagram/android/mediacache/IgImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 86
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->a:Lcom/instagram/android/mediacache/IgImageView;

    new-instance v1, Lcom/instagram/android/mediacache/k;

    invoke-direct {v1, p0}, Lcom/instagram/android/mediacache/k;-><init>(Lcom/instagram/android/mediacache/i;)V

    invoke-virtual {v0, v1}, Lcom/instagram/android/mediacache/IgImageView;->setProgressListener(Lcom/instagram/android/mediacache/h;)V

    .line 96
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->a:Lcom/instagram/android/mediacache/IgImageView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/instagram/android/mediacache/IgImageView;->setReportProgress(Z)V

    .line 97
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->a:Lcom/instagram/android/mediacache/IgImageView;

    new-instance v1, Lcom/instagram/android/mediacache/l;

    invoke-direct {v1, p0}, Lcom/instagram/android/mediacache/l;-><init>(Lcom/instagram/android/mediacache/i;)V

    invoke-virtual {v0, v1}, Lcom/instagram/android/mediacache/IgImageView;->setOnLoadListener(Lcom/instagram/android/mediacache/g;)V

    .line 111
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->a:Lcom/instagram/android/mediacache/IgImageView;

    return-object v0
.end method

.method private getProgressBar()Landroid/widget/ProgressBar;
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 115
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->b:Landroid/widget/ProgressBar;

    if-nez v0, :cond_0

    .line 116
    new-instance v0, Landroid/widget/ProgressBar;

    invoke-virtual {p0}, Lcom/instagram/android/mediacache/i;->getContext()Landroid/content/Context;

    move-result-object v1

    const/4 v2, 0x0

    const v3, 0x1010078

    invoke-direct {v0, v1, v2, v3}, Landroid/widget/ProgressBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    iput-object v0, p0, Lcom/instagram/android/mediacache/i;->b:Landroid/widget/ProgressBar;

    .line 117
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->b:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v4}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    .line 118
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->b:Landroid/widget/ProgressBar;

    const/16 v1, 0x64

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setMax(I)V

    .line 119
    invoke-virtual {p0}, Lcom/instagram/android/mediacache/i;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    sget v1, Lcom/facebook/au;->row_feed_photo_padding:I

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    .line 120
    iget-object v1, p0, Lcom/instagram/android/mediacache/i;->b:Landroid/widget/ProgressBar;

    invoke-virtual {v1, v0, v4, v0, v4}, Landroid/widget/ProgressBar;->setPadding(IIII)V

    .line 122
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->b:Landroid/widget/ProgressBar;

    return-object v0
.end method

.method private getTextView()Landroid/widget/TextView;
    .locals 2

    .prologue
    .line 68
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->c:Landroid/widget/TextView;

    if-nez v0, :cond_0

    .line 69
    new-instance v0, Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/instagram/android/mediacache/i;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/instagram/android/mediacache/i;->c:Landroid/widget/TextView;

    .line 70
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->c:Landroid/widget/TextView;

    sget v1, Lcom/facebook/ba;->tap_to_reload:I

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 71
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->c:Landroid/widget/TextView;

    const/16 v1, 0x11

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setGravity(I)V

    .line 72
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->c:Landroid/widget/TextView;

    new-instance v1, Lcom/instagram/android/mediacache/j;

    invoke-direct {v1, p0}, Lcom/instagram/android/mediacache/j;-><init>(Lcom/instagram/android/mediacache/i;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 79
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->c:Landroid/widget/TextView;

    return-object v0
.end method


# virtual methods
.method protected a()V
    .locals 6

    .prologue
    const/4 v5, -0x2

    const/16 v4, 0x11

    const/4 v3, -0x1

    .line 43
    invoke-virtual {p0}, Lcom/instagram/android/mediacache/i;->removeAllViews()V

    .line 46
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getIgImageView()Lcom/instagram/android/mediacache/IgImageView;

    move-result-object v0

    const/4 v1, 0x0

    new-instance v2, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v2, v3, v3, v4}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    invoke-virtual {p0, v0, v1, v2}, Lcom/instagram/android/mediacache/i;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

    .line 53
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getProgressBar()Landroid/widget/ProgressBar;

    move-result-object v0

    const/4 v1, 0x1

    new-instance v2, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v2, v3, v5, v4}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    invoke-virtual {p0, v0, v1, v2}, Lcom/instagram/android/mediacache/i;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

    .line 60
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getTextView()Landroid/widget/TextView;

    move-result-object v0

    const/4 v1, 0x2

    new-instance v2, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v2, v3, v5, v4}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    invoke-virtual {p0, v0, v1, v2}, Lcom/instagram/android/mediacache/i;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

    .line 65
    return-void
.end method

.method public a(Lcom/instagram/android/mediacache/m;)V
    .locals 1
    .parameter

    .prologue
    .line 142
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->d:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 143
    return-void
.end method

.method public b()Z
    .locals 1

    .prologue
    .line 138
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getIgImageView()Lcom/instagram/android/mediacache/IgImageView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/android/mediacache/IgImageView;->d()Z

    move-result v0

    return v0
.end method

.method public c()V
    .locals 1

    .prologue
    .line 146
    iget-object v0, p0, Lcom/instagram/android/mediacache/i;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 147
    return-void
.end method

.method public getUrl()Ljava/lang/String;
    .locals 1

    .prologue
    .line 134
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getIgImageView()Lcom/instagram/android/mediacache/IgImageView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/android/mediacache/IgImageView;->getUrl()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public setUrl(Ljava/lang/String;)V
    .locals 1
    .parameter "urlForRow"

    .prologue
    .line 126
    invoke-direct {p0}, Lcom/instagram/android/mediacache/i;->getIgImageView()Lcom/instagram/android/mediacache/IgImageView;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/instagram/android/mediacache/IgImageView;->setUrl(Ljava/lang/String;)V

    .line 127
    return-void
.end method
